<header>
    <div class="title">
        <a href=""><span class="icon user"></span>Servicio tecnico</a> <span class="icon chevron-right"></span> <strong>Registrar nuevo reporte</strong>
    </div>
    <div class="shortcuts">
        <a href=""></a>
    </div>
    <div class="help">
        <a href="">Ayuda</a>
    </div>
</header>
<div class="sidebar">
    <div id="service-create" class="content">
        <h2><span class="icon add-user"></span> Nuevo reporte</h2>
        <?php if (!empty($validacion)) { ?>
        <div class="alert alert-error">
            <span class="icon block"></span>
            <strong>Se han encontrado errores:</strong>
            <ul>
                <?php foreach ($validacion as $item_fail) { ?>
                    <li><label for="service-create-form-<?php echo $item_fail['item']; ?>"><?php echo $item_fail['message']; ?></label></li>
                <?php } ?>
            </ul>
        </div>
        <?php } ?>
        <form id="service-create-form" action="#" method="post" enctype="multipart/form-data">
    		<input name="form-action" type="hidden" value="create-service" />
            <div class="form-fields">
                <label>
                    <span class="name">Titulo:</span>
                    <input type="text" name="titulo" value="<?php if ($service->get('reportes','titulo')) echo html_entity_decode($service->get('reportes','titulo')); ?>" id="service-create-form-titulo" placeholder="Ingrese aquí el titulo del reporte" autofocus />
                    <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                </label>
                <div class="double">
                    <label>
                        <span class="name">Subsistema:</span>
                        <select name="subsistema">
                                <option value='TX' <?php if ($service->get('reportes','subsistema') == 'TX') echo 'selected';?>>Transmision</option>
                                <option value='COM' <?php if ($service->get('reportes','subsistema') == 'COM') echo 'selected';?>>Comunidad</option>
                                <option value='Home' <?php if ($service->get('reportes','subsistema') == 'Home') echo 'selected';?>>Pagina Principal</option>
                                <option value='SAI' <?php if ($service->get('reportes','subsistema') == 'SAI') echo 'selected';?>>Sistema de administracion interno</option>
                        </select>
                        <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                    </label>
                    <label>
                        <span class="name">Tipo:</span>
                        <select name="tipo">
                                <option value='1' <?php if ($service->get('reportes','tipo') == 1) echo 'selected';?>>Mal funcionamiento</option>
                                <option value='2' <?php if ($service->get('reportes','tipo') == 2) echo 'selected';?>>Sugerencia</option>
                                <option value='3' <?php if ($service->get('reportes','tipo') == 3) echo 'selected';?>>Critica</option>
                        </select>
                        <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                    </label>
                </div>
                <label>
                    <span class="name">Descripcion:</span>
                    <textarea name='descripcion' id="service-create-form-descripcion"><?php if ($service->get('reportes','descripcion')) echo html_entity_decode($service->get('reportes','descripcion')); ?></textarea>
                    <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                </label>
                </div>
            </div><br>
            <div class="form-buttons">
                <button type="submit" class="button important blue"><span class="icon circled-plus"></span> Registrar reporte</button>
                <a class="button important red" href="<?php echo $host .'services/' ?>">Cancelar</a>
            </div>
        </form>
    </div>
</div>